Events
Previous  Top  Next



An event is an action that takes place on a system level - showing or resizing a window for example, or the movement of a mouse. The Clip language recognizes four distinct events:

1. the opening of a Clipbook library;  
2. the closing of a Clipbook library;  
3. the Windows Clipboard receiving text;  
4. and timer events that are triggered at defined time intervals.  

You can execute Clip instructions when these events are triggered. Timer events are controlled with the "^!TimerPlay" command; the three other events are defined by creating Clips with the corresponding event name (OnOpen, OnClose, OnClipboardChange). When the event is triggered, the corresponding Clip is executed.

OnOpen

Automatically executes the OnOpen Clip when library is opened. Holding the Shift key down cancels the execution of the Clip.

OnClose
Automatically executes the OnClose Clip when library is closed (either by changing to another library or by closing the Clipbook). Holding the Shift key down cancels the execution of the Clip.

OnClipboardChange
Automatically executes content of the OnClipboardChange Clip whenever text is copied to the Windows Clipboard. Note that you must close libraries containing this type of Clip if you no longer want to capture text changes to the Clipboard.


Timer Commands:

^!TimerPlay ClipName
Assigns the Clip instructions to the timer memory. The instructions remain available even when you change libraries but are cleared when you close the Clipbook.

^!TimerStart nnnn
Defines an event timer. nnnn represents the interval in milliseconds. For example, "^!TimerStart 5000" will execute the assigned Clip (set with "^!TimerPlay") every 5 seconds. Note that the Clip is not executed if the Clipbook is already in the process of executing another Clip.

^!TimerStop
Stops the timer and clears the assigned Clip instructions.